//
//  RoadsideAssistanceShopServiceCell.m
//  JxCarios
//
//  Created by xcq on 15/2/1.
//  Copyright (c) 2015年 xiongchuanqi. All rights reserved.
//

#import "RoadsideAssistanceShopServiceCell.h"

@implementation RoadsideAssistanceShopServiceCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setInfo:(NSDictionary *)info{
    if (info) {
        _info = info;
        _name.text = [_info customObjectForkey:@"GOOD_NAME"];
        _buyPrice.text = [_info customObjectForkey:@"CHEAP_PRICE"];
        _originalPrice.text = [_info customObjectForkey:@"PRICE"];
        if([[_info customObjectForkey:@"IS_VB"] isEqualToString:@"yes"]){
            _is_vb = YES;
        }else{
            _is_vb = NO;
        }
     }
}

- (IBAction)checkAction:(id)sender {
    UIButton *btn = (UIButton *)sender;
    _checkBtn.selected = !_checkBtn.selected;
    _seleted = _checkBtn.selected;
    if ([_delegate respondsToSelector:@selector(checkCallBack:andSeleted:)]) {
        [_delegate checkCallBack:self andSeleted:btn.selected];
    }
}
@end
